#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
typedef long long ll;
bool isPrime(ll a)
{
    for (ll i = 2; i <= sqrt(a); i++)
    {
        if (a % i == 0)
            return false;
    }
    return true;
}
ll N;
int main()
{
    cin >> N;
    ll s = 0, l = 0;
    ll st = 1;
    if (isPrime(N))
        printf("1\n%lld\n", N);
    else
    {
        for (ll i = 2; i <= sqrt(N); i++)
        {
            st = 1;
            for (ll j = i; st * j <= N; j++)
            {
                st = st * j;
                if (N % st == 0 && j - i + 1 > l)
                {
                    s = i;
                    l = j - i + 1;
                }
            }
        }
        printf("%lld\n", l);
        for (ll i = s; i < s + l; i++)
        {
            if (i == s)
            {
                printf("%lld", i);
            }
            else
            {
                printf("*%lld", i);
            }
        }
        cout << "\n";
    }
}